package Midium;

import java.util.List;

//17.电话号码的字母组合
//没做出来 先放着吧。
public class Solution17 {
    public List<String> letterCombinations(String digits) {
        //只有7和9会产生四种字母，其他都是三种字母
        char[][] chars = new char[digits.length()][4];
        int _79count = 0;
        int _otherCount = 0;
        for (int i = 0; i < digits.length(); i++) {
            switch (digits.charAt(i)) {
                case '2':
                    chars[i][0] = 'a';
                    chars[i][1] = 'b';
                    chars[i][2] = 'c';
                    chars[i][3] = '0';
                    _otherCount++;
                    break;
                case '3':
                    chars[i][0] = 'd';
                    chars[i][1] = 'e';
                    chars[i][2] = 'f';
                    chars[i][3] = '0';
                    _otherCount++;
                    break;
                case '4':
                    chars[i][0] = 'g';
                    chars[i][1] = 'h';
                    chars[i][2] = 'i';
                    chars[i][3] = '0';
                    _otherCount++;
                    break;
                case '5':
                    chars[i][0] = 'j';
                    chars[i][1] = 'k';
                    chars[i][2] = 'l';
                    chars[i][3] = '0';
                    _otherCount++;
                    break;
                case '6':
                    chars[i][0] = 'm';
                    chars[i][1] = 'n';
                    chars[i][2] = 'o';
                    chars[i][3] = '0';
                    _otherCount++;
                    break;
                case '7':
                    chars[i][0] = 'p';
                    chars[i][1] = 'q';
                    chars[i][2] = 'r';
                    chars[i][3] = 's';
                    _79count++;
                    break;
                case '8':
                    chars[i][0] = 't';
                    chars[i][1] = 'u';
                    chars[i][2] = 'v';
                    chars[i][3] = '0';
                    _otherCount++;
                    break;
                case '9':
                    chars[i][0] = 'w';
                    chars[i][1] = 'x';
                    chars[i][2] = 'y';
                    chars[i][3] = 'z';
                    _79count++;
                    break;
            }
        }
        //计算返回结果List的String的个数
        double count = Math.pow(3, _otherCount) * Math.pow(4, _79count);
        count = (int) count;
        String str = "";
        for (int i = 0; i < count; i++) {

        }
        return null;
    }

    public static void main(String[] args) {
        //23673
        /*
         * a b c 0
         * d e f 0
         * m n o 0
         * p q r s
         * d e f 0
         * */
        //admpd admpe admpf admqd admqe admqf
    }
}
